Skip to content

ci(release): enforce SemVer prereleases and isolate extension tags - #367

Merged
samzong merged 1 commit into
mainfrom
fix/semver-release-workflows
Nov 25, 2026
Merged

samzong merged 1 commit into
mainfrom
fix/semver-release-workflows

Conversation

@samzong

@samzong samzong commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Closes #365

What's changed

  • Add strict SemVer tag validation (^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((alpha|beta|rc)\.[1-9][0-9]*))?$) and TOML workspace version checks to .github/workflows/release.yml.
  • Pass --prerelease without --latest to gh release create in .github/workflows/release.yml for -alpha.N, -beta.N, and -rc.N tags.
  • Update tag_pattern in cliff.toml to ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-(alpha|beta|rc)\.[1-9][0-9]*)?$ so changelogs include core prereleases and exclude recall-*-v* tags.
  • Enforce strict SemVer validation and prerelease ordering in .github/workflows/extension-release.yml. Preserve --latest=false on every extension release, pass --prerelease on prerelease tags, and skip catalog.json updates for prereleases.
  • Update cookie from 0.18.1 to 0.18.3 in Cargo.lock to resolve RUSTSEC-2026-0594 in cargo audit.

Why

Recall needs strict SemVer prerelease gating and tag isolation before v1.0.0 (#366). Previously, core releases omitted --prerelease, cliff.toml excluded prerelease tags, extension-release.yml stripped prerelease suffixes during ordering, and catalog.json accepted prereleases into the stable channel. This change leaves src/extension.rs semver_key updates for #366 and keeps prerelease extensions out of catalog.json to protect 0.7.0 installations.

Test evidence

  • Environment: macOS arm64, git-cliff 2.14.1, cargo-audit 0.22.2, uv, and Python 3.13.
  • Quality gate: make check passed dependency audit (570 crate dependencies), cargo fmt --all -- --check, workspace cargo clippy --workspace --all-targets --features bench -- -D warnings, and cargo test --workspace (818 tests across 21 suites).
  • Audit script: version_audit.py reported "status": "match" with zero findings on the worktree.
  • Changelog dry run: DRY_RUN=true ./scripts/regenerate-changelog 1.0.0-rc.1 exited 0. In an isolated repository copy, git-cliff --unreleased --tag v1.0.0-rc.1 anchored against v1.0.0-alpha.1 and ignored recall-probe-v9.9.9, v1.0.0-fix.1, v01.2.0, and v1.0.0-rc.0.
  • Fault injection: extracted scripts from .github/workflows/release.yml and .github/workflows/extension-release.yml rejected -fix.1, leading zeros, -rc.0, manifest mismatches, commit mismatches, and downgrades (0.1.0 to 0.1.0-rc.1).
  • Prerelease path: valid -alpha.1, -beta.2, -rc.1 to 0.2.0 promotions passed validation and passed --prerelease (plus --latest=false for extensions) to a gh CLI shim.
  • Unverified: live GitHub Actions execution of release.yml and extension-release.yml did not run because pushing release tags requires separate owner authorization.

Enforce strict SemVer tag validation, workspace version matching, and prerelease flags in core and extension release workflows, anchor cliff.toml to SemVer core tags, and update cookie to 0.18.3 in Cargo.lock to clear RUSTSEC-2026-0594.

Signed-off-by: samzong <samzong.lu@gmail.com>
@samzong
samzong marked this pull request as ready for review November 25, 2026 08:18
@samzong
samzong merged commit 6422642 into main Nov 25, 2026
9 checks passed
@samzong
samzong deleted the fix/semver-release-workflows branch November 25, 2026 08:19
samzong added a commit that referenced this pull request Nov 25, 2026
## Result

Prepare Recall 1.0.0-rc.1 without changing protocol version 2 or export schema 7. Refs #366.

- Preserve SemVer prerelease precedence in extension selection and minimum core requirements. Reuse the existing locked `semver` crate rather than maintain a second parser.
- Reject a newer SQLite index before journal changes or migrations. Keep schema 20 and the existing forward migrations and backups.
- Exercise rx-agent sync/search, CLI JSON/JSONL, MCP stdio, future-schema rejection, and all seven extension manifests through built binaries in an isolated HOME as part of `make check`.
- Accept GitHub's default squash title in the release gate. Keep the exact version and PR-number checks.
- Generate the RC changelog with git-cliff and correct the documented runtime error contract: nonzero status, empty JSON stdout, human-readable stderr.

The extension release workflow already sorts prereleases by stage and numeric sequence after #367. Its current function passed alpha/beta/rc.2/rc.10/final ordering checks; the remaining suffix-stripping defect was in the core extension selector.

## Contract audit and issue triage

| Item | RC.1 disposition |
| --- | --- |
| #365 / #367 | Fixed before this PR: strict SemVer release tags, prerelease publication, stable-catalog filtering, and core/extension tag isolation. Workflow ordering verified here. |
| #190 | Deferred: no secret scanner. Users must review session content before sharing or exporting it. |
| #347 | Deferred: space-free Chinese substring recall needs a search design and benchmark. No search behavior changes here. |
| #348 | Deferred: mixed CJK/Latin candidate starvation needs a judged regression set and ranking work. |
| #310 | Original scheduler defect fixed by #309. Native macOS launchd lifecycle coverage remains deferred; this PR changes no scheduler behavior. |
| #311 | Original TCC timeout/guidance corrected by #309. Sequential folder-consent acceptance remains manual and deferred. |
| #312 | Deferred: Windows native cleanup/rejection coverage and a deadline for pathological post-kill kernel waits remain unverified. No Windows defect was reproduced here. |
| #313 | Original diagnostic defects fixed by #309. Remaining guidance-review gate work is deferred until the next diagnostic change. |
| #330 | CLI gap addressed: the gate now uses a real rx-agent fixture through sync, source-filtered list/search/export, and MCP. TUI visual acceptance remains deferred. |

CLI consumers keep the published JSON/JSONL fields. MCP keeps its five existing tools and required arguments; existing tests cover limits, cursors, and schema validation. Existing migration tests cover v16-to-v20 data, FTS, usage, topology, events, and restorable backups, plus resumable v19-to-v20 backfill. New tests reject schema 21 without changing database bytes. No applied migration or extension package version changes.

## Test evidence

macOS 27.2.1 arm64; cargo 1.96.0; cargo-audit 0.22.2; git-cliff 2.14.1; Python 3.14.

- `make check`: passed dependency audit, format, workspace Clippy with bench, workspace tests, workspace binary build, and public contract smoke.
- `python3 scripts/check-contracts target/debug/recall --extensions`: passed against isolated rx-agent data (one session, four messages, three usage events), CLI JSON/JSONL, MCP initialize/tools/list/tools/call, future-index rejection, and seven extension manifests.
- Three new contract tests failed on the original implementation and passed after the fixes: prerelease catalog selection, RC/final minimum compatibility, and future-schema rejection.
- Fault injection made the new smoke fail for wrong version, missing rx-agent sync, stdout noise, wrong JSONL schema, and a missing MCP tool. The unchanged control passed.
- Release-gate probes reproduced rejection of a valid squash title before the fix. The updated gate accepts the exact release title with or without a positive PR number and rejects wrong versions and unrelated titles. Removing its guard made the negative probe fail.
- The canonical `version_audit.py` from the agents repository's `origin/main` reports `status: "match"` and zero findings.
- `pre-ship check --json`: PASS.

## Unverified

The published RC artifact will be tested after this PR lands and the tag workflow succeeds. Local runtime evidence covers macOS arm64; Linux uses the same CI gate. Windows and Intel macOS native runtime, TUI visual behavior, launchd/TCC interactions, and the deferred issue behavior above are not claimed as verified. This PR does not authorize final v1.0.0 promotion.

Signed-off-by: samzong <samzong.lu@gmail.com>
Auto-merged-by: agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support SemVer prereleases and isolate extension tags in release workflows

1 participant